// pages/punchRecord/punchRecord.js
const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    session_key:'',
    sign_data:'',
    sign_list:''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    that.setData({
      session_key: wx.getStorageSync("token")
    })
    //获取个人信息
    wx.request({
      url: app.globalData.httpsPath + '/user/sign/list',
      method: 'POST',
      header: {
        'content-type': 'application/json'
      },
      data: {
        token: that.data.session_key
      },
      //请求后台数据成功  
      success: function (res) {
        var sign_data = res.data.data;
        console.info(sign_data);
        that.setData({
          sign_data: sign_data,
          sign_list: sign_data.data
        })
      }
    })
  },

  
})